package cn.tedu.boot1.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {

    @RequestMapping("/bmi")
    public String bmi(float h,float w){
        System.out.println("h = " + h + ", w = " + w);
        float bmi = w/(h*h);
        System.out.println(bmi);
        if (bmi<18.5){
            return "兄弟你瘦了!";
        }
        if (bmi<24){
            return "身体健康吃嘛嘛香!";
        }
        return "可以开始运动了!";
    }
}
